package thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by Administrator on 2017/10/19 0019.
 */
public class ThreadPoolDemo
{
    public static void main(String[] args)
    {

        ExecutorService es = Executors.newFixedThreadPool(5);
        Runnable r = (()->{

            for (int i = 0; i < 20; i++)
            {
                System.out.println(Thread.currentThread().getName());
            }

        });
        es.submit(r);
        es.submit(r);
        es.shutdown();
        ThreadLocal<String> tl = new ThreadLocal<>();
        
    }
}
